<template>
    <viewLayout v-model="pager">
      <template #query-form>
        <el-form :inline="true" style="display: flex">
          <el-form-item label="器械商名称">
            <el-input
              v-model="queryForm.name"
              placeholder="请输入器械商名称"
            />
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="getList">查询</el-button>
            <el-button @click="resetPage">重置</el-button>
          </el-form-item>
        </el-form>
      </template>
      <tableList :list="pager.list" :loading="pager.loading" @refresh="getList" />
    </viewLayout>
  </template>
  
  <script setup>
  import { ref } from "vue";
  import usePagination from "@/hooks/usePagination";
  import { getMedicalUserListAPI } from "@/network/medicaluser";
  import tableList from "./c-cmps/tableList.vue";
  
  const queryForm = ref({
    name: "",
  });
  
  const { getList, pager, resetPage } = usePagination({
    request: getMedicalUserListAPI,
    params: queryForm,
  });
  getList();
  </script>